package top.yudoge.dogeeditor.db.api

import top.yudoge.dogeeditor.db.datasource.DataSourceManager
import top.yudoge.dogeeditor.db.objects.*

/**
 * @author Yudoge
 * @since 2025/03/19
 *
 * This class allow high-level modules can access database metadata in a uniform RPC way.
 * But for now we permit use this class directly
 */
interface DataSourceMetaDataApi {

    fun getDataSources(): List<DataSource> {
        TODO("NOT IMPLEMENTED!")
    }

    fun getDatabases(dataSourceIdentifier: String): List<Database> {
        TODO("NOT IMPLEMENTED!")
    }

    fun getSchemas(dataSourceIdentifier: String, databaseName: String): List<Schema> {
        TODO("NOT IMPLEMENTED!")
    }

    fun getTables(dataSourceIdentifier: String, databaseName: String, schemaName: String): List<Table> {
        TODO("NOT IMPLEMENTED!")
    }

    fun getColumns(dataSourceIdentifier: String, databaseName: String, schemaName: String, tableName: String): List<Column> {
        TODO("NOT IMPLEMENTED!")
    }

    fun getIndexes(dataSourceIdentifier: String, databaseName: String, schemaName: String, tableName: String): List<Index> {
        TODO("NOT IMPLEMENTED!")
    }

    fun executeSql(dataSourceIdentifier: String, databaseName: String, schemaName: String, sql: String): SQLExecuteResult

}